<script>
export default {
  name: "Leader",
  data(){
    return{name:'老王',age:56}
  },
  methods:{
    sendName(){
      this.$emit('leaderEvent',this.name)
    }
  }
}
</script>

<template>
  <div>
    <h1>领导姓名:{{name}}</h1>
    <h1>领导年龄:{{age}}</h1>
    <button @click="sendName">发送校长姓名到app</button>
  </div>
</template>

<style scoped>

</style>
